<template>
  <el-form :inline="true" class="flex flex-wrap">
    <el-form-item label="">
      <el-input
        v-model="searchKey"
        placeholder="请输入搜索内容"
        size="small"
      ></el-input>
    </el-form-item>
    <el-form-item label="">
      <el-date-picker
        size="small"
        v-model="monthNo"
        type="month"
        placeholder="选择月"
        value-format="yyyyMM"
        :clearable="false"
      >
      </el-date-picker>
    </el-form-item>
    <el-form-item label="会话类型">
      <el-select v-model="type" placeholder="请选择" clearable size="small">
        <el-option label="单聊" :value="0"></el-option>
        <el-option label="群组" :value="1"></el-option>
        <el-option label="聊天室" :value="2"></el-option>
        <el-option label="频道" :value="3"></el-option>
      </el-select>
    </el-form-item>

    <el-form-item label="消息类型">
      <el-select
        v-model="messageType"
        placeholder="请选择"
        clearable
        size="small"
      >
        <el-option label="文本" :value="1"></el-option>
        <el-option label="语音" :value="2"></el-option>
        <el-option label="图片" :value="3"></el-option>
        <el-option label="文件" :value="5"></el-option>
        <el-option label="视频" :value="6"></el-option>
        <el-option label="表情" :value="7"></el-option>
        <el-option label="富媒体" :value="8"></el-option>
      </el-select>
    </el-form-item>

    <el-form-item label="">
      <el-button @click.prevent="$emit('on-search')" size="small" type="primary"
        >搜索</el-button
      >
    </el-form-item>
  </el-form>
</template>

<script>
// import typeSelect from "@/components/type-select.vue";
import { parseTime } from "@/utils/index";
export default {
  // components: {  typeSelect },
  data() {
    return {
      searchKey: null,
      contentType: null,
      messageType: "",
      monthNo: parseTime(new Date(), "{y}{m}"),
      type: "",
      targetId: null,
    };
  },
  computed: {
    conditions() {
      let obj = {
        ...this.$data,
      };
      return obj;
    },
  },
  created() {
    // this.axios.get("/department-options").then((res) => {
    //   this.dep_options = res.data;
    // });
    let params = this.$route.query;
    if (params.targetId) {
      this.targetId = params.targetId;
    }
  },
  methods: {},
};
</script>

<style lang='scss' scoped>
</style>